/*Get the Data*/	clear	set more off	cd "~/Dropbox/PSRM response/Replication/"	use "WhoGetsCredit_LetterWritersAttitudes.dta"	cd "~/Dropbox/PSRM response/Replication/Results/"	/*RESULTS CONTROLLING FOR PRIOR LEVEL OF ATTITUDE - NOTE THIS AFFECTS THE SIZE OF THE SAMPLE BUT NOT THE RESULTS*/** Table 1** Trust/General Approval - Specific to Legislator with Controls by level of Satisfaction	xi: reg therm_leg strong_sat some_sat not_sat missing_sat prethermleg i.PRE_race male independent partisanship_match service, cluster(personalid)			outreg2 using Table1,  dec(1) label word replace	xi: oprobit approval strong_sat some_sat not_sat missing_sat i.preapproval i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table1,  dec(1) label word append	xi: oprobit voteMC strong_sat some_sat not_sat missing_sat  i.prevoteMC i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table1,  dec(1) label word append** Table 2** Spillover Effects with Controls by level of Satisfaction	xi: reg therm_party strong_sat some_sat not_sat  missing_sat  prethermparty i.PRE_race male independent partisanship_match service, cluster(personalid) 		outreg2 using Table2,  dec(1) label word replace		test strong_sat=not_sat		test missing_sat=not_sat	xi: reg therm_cong strong_sat some_sat not_sat  missing_sat PRE_therm_cong i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table2,  dec(1) label word append		test strong_sat=not_sat	xi: oprobit trustlegislator strong_sat some_sat not_sat  missing_sat i.pretrust i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table2,  dec(1) label word append		test strong_sat=not_sat** Table 3** Trust/General Approval - Specific to Legislator	xi: reg therm_leg response_rec prethermleg i.PRE_race male independent partisanship_match service, cluster(personalid)			outreg2 using Table3,  dec(1) label word replace	xi: oprobit approval response_rec i.preapproval i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table3,  dec(1) label word append	xi: oprobit voteMC response_rec i.prevoteMC i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table3,  dec(1) label word append** Table 4	** Spillover Effects 	xi: reg therm_party response_rec prethermparty i.PRE_race male independent partisanship_match service, cluster(personalid) 		outreg2 using Table4,  dec(1) label word replace	xi: reg therm_cong response_rec PRE_therm_cong i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table4,  dec(1) label word append	xi: oprobit trustlegislator response_rec i.pretrust i.PRE_race male independent partisanship_match service, cluster(personalid)		outreg2 using Table4,  dec(1) label word append**Table 5	bysort response_rec: summ prethermleg therm_leg if therm_leg!=. & prethermleg!=.	bysort response_rec: summ preapproval approval if preapproval!=. & approval!=.	bysort response_rec: summ prevoteMC voteMC if prevoteMC!=. & voteMC!=.  	bysort response_rec: summ prethermparty therm_party if prethermparty!=. &  therm_party!=. 	bysort response_rec: summ PRE_therm_cong therm_cong if PRE_therm_cong!=. &  therm_cong!=.	bysort response_rec: summ pretrust trustlegislator if pretrust!=. &  trustlegislator!=.		    	** Create Figure 2/*Making pretty graphs for ordered Probit results*/	set obs 2000	/*Graph for MC Job Approval*/	replace response_rec=0 if _n>=1993		replace response_rec=1 if _n>=1997	replace preapproval=3 if _n>=1993		replace service=0 if _n>=1991		replace independent=0 if _n>=1991		replace partisanship_match=0 if _n>=1991	replace male=0 if _n>=1991	replace PRE_race=5 if _n>=1991				xi: oprobit approval response_rec i.preapproval i.PRE_race male independent partisanship_match service, cluster(personalid)	xi: oprob approval response_rec i.preapproval, cluster(personalid)	predict p1 p2 p3 p4		gen category=_n-1992 - (response_rec*4) if _n>=1993	gen pred_dv=p1 if _n==1993 | _n==1997		replace pred_dv=p2 if _n==1994 | _n==1998		replace pred_dv=p3 if _n==1995 | _n==1999		replace pred_dv=p4 if _n==1996 | _n==2000	twoway (connected pred_dv category if response_rec==0, msize(zero)) (connected pred_dv category if response_rec==1, msize(zero) lpattern(dash)),  ytitle(Probability for Each Category) xtitle(MC's Job Approval) xtitle(, margin(medsmall)) xlabel(1 "Strongly"  1"disapprove" 2 "Somewhat" 2 "disapprove" 3 "Somewhat" 3 "approve" 4 "Strongly  " 4 "approve  ", alternate) legend(off) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) text(.3 2 "Did Not Receive" "Response", place(w)) text(.63 3.2 "Did Receive" "Response", place(e))	drop category p1 p2 p3 p4 pred_dv	/*Vote for MC*/			replace response_rec=0 if _n>=1991		replace response_rec=1 if _n>=1996	replace prevoteMC=3 if _n>=1991		xi: oprob voteMC response_rec i.prevoteMC, cluster(personalid)	predict p1 p2 p3 p4 p5	gen category=_n-1990 - (response_rec*5) if _n>=1991	gen pred_dv=p1 if _n==1991 | _n==1996		replace pred_dv=p2 if _n==1992 | _n==1997		replace pred_dv=p3 if _n==1993 | _n==1998		replace pred_dv=p4 if _n==1994 | _n==1999		replace pred_dv=p5 if _n==1995 | _n==2000	twoway (connected pred_dv category if response_rec==0, msize(zero)) (connected pred_dv category if response_rec==1, msize(zero) lpattern(dash)),  ytitle(Probability for Each Category) xtitle(Likelihood of Voting for MC in Hypothetical Election) xtitle(, margin(medsmall)) xlabel(1 "Almost"  1"certainly not" 2 "Not" 2 "likely" 3 "Even" 3 "chance" 4 "Likely" 4 " " 5 "Almost  " 5 "certainly  ", alternate) legend(off) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) text(.285 1.95 "Did Not Receive" "Response", place(w)) text(.25 4.3 "Did Receive" "Response", place(e))	drop category p1 p2 p3 p4 p5 pred_dv